<!DOCTYPE html>
<html>
<head lang="en">
    <title>设备监控 - 门禁设备</title>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="shortcut icon" href="/cwp/favicon.ico" type="image/x-icon" />
    <!--引入CSS文件-->
    <link rel="stylesheet" type="text/css" href="../../../assets/css/styles/style.css" />
    <link rel="stylesheet" type="text/css" href="../../../assets/css/styles/components-css/list.css" />
    <link rel="stylesheet" type="text/css" href="../../../assets/css/styles/components-css/btn.css" />
    <link rel="stylesheet" type="text/css" href="../../../assets/css/styles/components-css/tabs.css" />
    <link rel="stylesheet" type="text/css" href="../../../assets/css/styles/components-css/taqs.css" />
    <link rel="stylesheet" type="text/css" href="../../../assets/css/styles/components-css/panel.css"  />
    <link rel="stylesheet" type="text/css" href="../../../assets/css/styles/components-css/table.css" />
    <link rel="stylesheet" type="text/css" href="../../../assets/lib/zTree/css/metroStyle/metroStyle.css"/>

    <!--引入bootstrap CSS文件-->
    <link rel="stylesheet" type="text/css" href="../../../assets/lib/bootstrap-3.3.5-dist/css/bootstrapModel.css" />
    <link rel="stylesheet" type="text/css" href="../../../assets/css/styles/animate.min.css" />
    <link rel="stylesheet" type="text/css" href="../../../assets/css/smartSecurity/device.css"/>
    <style>
        #faultAlarmTabPagination{
            display: none;;
        }

    </style>
</head>
<body>

<!--头部文件 开始-->
<div id="header" class="hide"></div>
<!--头部文件 结束-->


<!--主要内容开始-->
<div class="wrapper open">
    <!--左侧菜单 开始-->
    <div id="left-menu" class=""></div>
    <div class="center_td">

        <div class="device_state mb-20 pb-20 hide">
            <div class="title">
                设备状态
            </div>
            <ul>
                <li><span class="icon-location2 t-tip-error"></span>故障</li>
                <li><span class="icon-location2 t-tip-todo"></span>正常</li>
            </ul>
        </div>
        <!--搜索-->
        <div class="search">
            <input type="text" id="btn-search-device" placeholder="搜索门禁设备" />
        </div>
        <div class="clearfix">
            <!--楼层菜单-->
            <div id="floor" class="fl mt-10">
                <div class="title hide">
                    门禁设备
                </div>

                <div class="content">
                    <form id="frmTree">
                        <input type="hidden" id="buildingId" value=""/>
                        <div class="title">楼层</div>
                        <ul class="floorMenu" id="floorMenuList">

                        </ul>
                    </form>
                </div>
            </div>

            <!--设备列表-->
            <div id="device-list" class="fr">
                <div class="title">设备位置</div>
                <ul id="deviceList">

                </ul>
            </div>
         </div>
    </div>
    <!--右侧内容 开始-->
    <div class="right-container">
        <div class="right-scroll">
            <div class="t-list" style="width: 100%;height: 100%;">
                <!--门禁设备-->
                <div class="t-building">
                    <!--楼层-->
                    <div class="img-title">
                        <div class="clearfix">
                            <div class="clearfix item">
                                <img src="../../../assets/img/menjin1-1.png"><span>正常运行</span>
                            </div>
                            <div class="clearfix item">
                                <img src="../../../assets/img/menjin2-1.png"><span>设备报警</span>
                            </div>
                            <!--<div class="clearfix item">-->
                                <!--<img src="../../../assets/img/menjin3-1.png"><span>设备停运</span>-->
                            <!--</div>-->
                            <div class="clearfix item">
                                <a class="t-btn t-btn-blue" id="btnOpenAll" data-ip="" data-target="" style="   position: absolute;top: -8%;">一键开门</a>
                            </div>
                        </div>
                        <ul id="deviceInfo" class="mt-10">

                        </ul>
                    </div>
                    <div id="floor-list">

                    </div>
                    <!--工具栏-->
                    <div class="status-bar clearfix">
                        <img src="../../../assets/img/compass_icon.png" style="width: 100%"/>
                    </div>
                </div>

                <div class="info-box t-tabs" style="">
                    <ul id="myTabs" class="t-tabs-items clearfix">
                        <li class="active"><a href="#tab1" data-toggle="tab">运行日志</a></li>
                        <li><a href="#tab2" data-toggle="tab">安防告警</a></li>
                        <li style="float: right; "><a class="t-btn t-btn-blue" style="font-size: 32px;" id="btnCloseList" >×</a></li>
                    </ul>
                    <!--列表-->
                    <div id="myTabContent" class="tab-content" style="padding-bottom: 0">
                        <div class="tab-pane fade in active" id="tab1">
                            <div class="t-list-btns" style="margin-top: 0">
                                <p>请求记录</p>
                                <span id="faultAlarmTabTotal"></span>
                                <!--<div >-->
                                    <!--<a class="t-btn t-btn-blue" id="btnConDoor" data-ip="" data-target="">开门</a>-->
                                <!--</div>-->
                            </div>

                            <div class="t-list-result clearfix">
                                <input type="hidden" id="hidDeviceID" name="deviceId" value=""/>
                                <!-- 表格 -->
                                <table class="t-table" id="faultAlarmTab" style="margin: 0">
                                    <thead>
                                        <tr>
                                            <th>ID</th>
                                            <th>姓名</th>
                                            <th>卡号</th>
                                            <th>时间</th>
                                            <th>事件</th>
                                        </tr>
                                    </thead>
                                    <tbody>

                                    </tbody>
                                </table>
                                <div class="loading-container"></div>
                                <!-- 分页 -->
                                <div class="pagination" id="faultAlarmTabPagination"></div>
                            </div>
                        </div>
                    <div class="tab-pane fade" id="tab2">
                        <div class="t-list-btns" style="margin-top: 0">
                            <p>请求记录</p>
                            <span id="deviceReportTotal"></span>
                        </div>

                        <div class="t-list-result clearfix">
                            <input type="hidden" id="hidDeviceID1" name="deviceId" value=""/>
                            <!-- 表格 -->
                            <table class="t-table" id="deviceReport" style="margin: 0">
                                <thead>
                                <tr>
                                    <th>告警编号</th>
                                    <th>来源</th>
                                    <th>描述</th>
                                    <th>时间</th>
                                    <th>状态</th>
                                </tr>
                                </thead>
                                <tbody>

                                </tbody>
                            </table>
                            <div class="loading-container"></div>
                            <!-- 分页 -->
                            <div class="pagination" id="deviceReportPagination"></div>
                        </div>
                    </div>
                </div>
                </div>
            </div>
        </div>
    </div>
    <!--左侧菜单 结束-->
</div>
<!--版权-->
<div id="copyright"  class="hide"></div>


<!--提示模态框-->
<div class="modal fade bs-example-modal-sm" id="myTip" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel">
    <div class="modal-dialog modal-sm" role="document">
        <div class="modal-content">
            <div class="modal-body" style="text-align:center;font-size:14px;">
                <i id="icon-tip" style="margin-right:6px;"></i>
                <span class="tip-info"></span>
            </div>
        </div>
    </div>
</div>


<!--开关确认模态框-->
<div class="modal fade bs-example-modal-sm" id="modalSwitch" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel">
    <div class="modal-dialog modal-sm" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title">门禁设备控制</h4>
            </div>
            <div class="modal-body">
                <div class="t-list">
                    <input type="hidden"  id="hidSwitch" value=""/>
                    <div class="content" style="line-height: 24px">

                    </div>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                <button type="button" class="btn btn-primary"  id="btnAllDevice">确定</button>
            </div>
        </div>
    </div>
</div>

<!--jQuery库脚本-->
<!--非IE8浏览器-->
<!--[if !(IE 8)]><!--><script type="text/javascript" src="../../../assets/lib/jquery/jquery.min.js"></script><!--<![endif]-->
<!--IE8浏览器-->
<!--[if IE 8]><script type="text/javascript" src="../../../assets/lib/jquery/jquery-ie8.min.js"></script><![endif]-->
<script type="text/javascript" src="../../../assets/lib/jQuery-slimScroll-1.3.8/jquery.slimscroll.min.js"></script>
<script src="../../../assets/common/loadHeaderAndCopyright.js"></script>
<script src="../../../assets/common/wrapperHeight.js"></script>
<!--模态框-->
<script src="../../../assets/lib/bootstrap-3.3.5-dist/js/bootstrap.js"></script>
<!--模态提示框-->
<script src="../../../assets/common/centerModal.js"></script>
<script src="../../../assets/common/ajaxPoster.js"></script>
<script charset="utf-8" src="../../../assets/lib/tipModal/js/tipModal.js"></script>
<!--分页脚本-->
<script charset="utf-8" src="../../../assets/lib/pagination/1.2.1/jquery.pagination.js"></script>

<script charset="utf-8" src="../../../assets/lib/artTemplate/template.js"></script>
<script src="../../../assets/common/loaderTableTmpl.js"></script>
<script src="../../../js/monitorDevices/smartSecurity/initGuard20170621.js"></script>
<!--加载楼层菜单-->
<script type="text/html" id="menuListTmpl">
    {{each beans}}
    <li><a class="floor-item {{$value.num | numFormat}}" data-id="{{$value.buildingId}}">{{$value.buildingDesc}}</a></li>
    {{/each}}
</script>
<!--加载设备列表-->
<script type="text/html" id="deviceTmpl">
    {{each beans}}
    <li><a class='device-item' title="{{$value.devicePositionDescribe}}" data-id="{{$value.deviceId}}">{{$value.devicePositionDescribe}}</a></li>
    {{/each}}
</script>
<!--运行日志-->
<script type="text/html" id="deviceDetailTmpl">
    {{each beans}}
    <tr><td>{{$value.cardId}}</td><td>{{$value.staffName}}</td><td>{{$value.staffNo}}</td><td>{{$value.createtime}}</td><td>{{$value.eventName}}</td></tr>
    {{/each}}
</script>
<!--故障告警-->
<script type="text/html" id="deviceReportTmpl">
    {{each beans}}
    <tr>
        <td>{{$value.alarmNumber}}</td>
        <td>{{$value.eventFromSystem | eventFromSystemFormat}}</td>
        <td>{{$value.eventDescribe}}</td>
        <td>{{$value.applyTime}}</td>
        <td>{{$value.eventProcessStatus | eventProcessStatusFormat}}</td>
    </tr>
    {{/each}}
</script>
<!--加载楼层地图-->
<script type="text/html" id="mapTmpl">
    {{each beans}}
    <div class="floor-image {{$value.num | mapFormat}}" id="floor{{$value.buildingId}}">
        <img src="{{$value.num | mapImgFormat}}" alt="">
        <div class='device-coordinate-item selected' id="{{$value.buildingId}}">

        </div>
    </div>
    {{/each}}
</script>
<!--设备信息-->
<script type="text/html" id="deviceInfoTmpl">
    <li><label>设备类型：</label>{{bean.deviceName}}</li>
    <li><label>设备编号：</label>{{bean.devicePositionCode}}</li>
    <li><label>设备位置：</label>{{bean.devicePositionDescribe}}</li>
    <li><label>设备 I P ：</label>{{bean.controllerip}}</li>
    <li><label>安装时间：</label>{{bean.deviceInstallTime}}</li>
    <li><label>控制开关：</label><a class="t-btn t-btn-blue" id="btnConDoor">开门</a></li>
</script>
</body>


</html>